package com.dhcc.bpm.modules.alarm.service.impl;

import com.dhcc.bpm.modules.alarm.entity.AlarmStrategy;
import com.dhcc.bpm.modules.alarm.vo.AlarmStrategyVO;
import com.dhcc.bpm.modules.alarm.mapper.AlarmStrategyMapper;
import com.dhcc.bpm.modules.alarm.service.IAlarmStrategyService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;


/**
 * @Description 告警策略表 服务实现类
 * @Author sjm
 * @Date 2020/2/21 0021 15:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 **/
@Service
public class AlarmStrategyServiceImpl extends BaseServiceImpl<AlarmStrategyMapper, AlarmStrategy> implements IAlarmStrategyService {

	/**
	 * @Description 分页查询
	 * @Author xiafayu
	 * @Date 2020/2/24 17:31
	 * @param page
	 * @param alarmStrategy
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.alarm.vo.AlarmStrategyVO>
	 **/
	@Override
	public IPage<AlarmStrategyVO> selectAlarmStrategyPage(IPage<AlarmStrategyVO> page, AlarmStrategyVO alarmStrategy) {
		return page.setRecords(baseMapper.selectAlarmStrategyPage(page, alarmStrategy));
	}

	@Override
	public List<String> selectAlarmStrategyNameById(Long id) {
		return baseMapper.selectAlarmStrategyNameById(id);
	}

}
